package com.lanchetech.dao;

import java.util.List;

import com.lanchetech.entity.RoomSpu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface RoomSpuMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RoomSpu record);

    int insertSelective(RoomSpu record);

    RoomSpu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RoomSpu record);

    int updateByPrimaryKey(RoomSpu record);

    int maxSorts(@Param("roomId") Long roomId);

    List<RoomSpu> findAllByRoomId(@Param("roomId") Long roomId);

    int updateSotrsBatch(@Param("list") List<RoomSpu> list);

    int updateBatch(@Param("list") List<RoomSpu> roomSpuList);

    int updateStatusByRoomId(@Param("updatedStatus") Byte updatedStatus, @Param("roomId") Long roomId);

    int updateStatusById(@Param("updatedStatus") Byte updatedStatus, @Param("id") Long id);

    int deleteByRoomId(@Param("roomId") Long roomId);

    int deleteByRoomIds(@Param("list") List<Long> list);

    RoomSpu findOneByRoomIdAndStatus(@Param("roomId")Long roomId,@Param("status")Byte status);
}